package MaintMenu.VenPricingUpdMasterFiles;

/**
 * Created with IntelliJ IDEA.
 * User: Jason
 * Date: 6/21/13
 * Time: 2:46 PM
 * To change this template use File | Settings | File Templates.
 */
public class SQLUpdStm {


    //method for 1 set of field to be updated
    public String StmExecute(String Ta, String Tb,String Wa, String Wb, String Wo, String Oa, String Ob, String a1, String b1){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+"" + 
                


                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 2 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob, String a1, String b1, String a2, String b2){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 3 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob, String a1, String b1, String a2, String b2, String a3, String b3){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+" ," +
                "a."+a3+" = b."+b3+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 4 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob,
                             String a1, String b1,
                             String a2, String b2,
                             String a3, String b3,
                             String a4, String b4){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+" ," +
                "a."+a3+" = b."+b3+" ," +
                "a."+a4+" = b."+b4+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 5 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob,
                             String a1, String b1,
                             String a2, String b2,
                             String a3, String b3,
                             String a4, String b4,
                             String a5, String b5
                             ){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+" ," +
                "a."+a3+" = b."+b3+" ," +
                "a."+a4+" = b."+b4+" ," +
                "a."+a5+" = b."+b5+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 6 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob,
                             String a1, String b1,
                             String a2, String b2,
                             String a3, String b3,
                             String a4, String b4,
                             String a5, String b5,
                             String a6, String b6
    ){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+" ," +
                "a."+a3+" = b."+b3+" ," +
                "a."+a4+" = b."+b4+" ," +
                "a."+a5+" = b."+b5+" ," +
                "a."+a6+" = b."+b6+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 7 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob,
                             String a1, String b1,
                             String a2, String b2,
                             String a3, String b3,
                             String a4, String b4,
                             String a5, String b5,
                             String a6, String b6,
                             String a7, String b7
    ){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+" ," +
                "a."+a3+" = b."+b3+" ," +
                "a."+a4+" = b."+b4+" ," +
                "a."+a5+" = b."+b5+" ," +
                "a."+a6+" = b."+b6+" ," +
                "a."+a7+" = b."+b7+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 8 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob,
                             String a1, String b1,
                             String a2, String b2,
                             String a3, String b3,
                             String a4, String b4,
                             String a5, String b5,
                             String a6, String b6,
                             String a7, String b7,
                             String a8, String b8
    ){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+" ," +
                "a."+a3+" = b."+b3+" ," +
                "a."+a4+" = b."+b4+" ," +
                "a."+a5+" = b."+b5+" ," +
                "a."+a6+" = b."+b6+" ," +
                "a."+a7+" = b."+b7+" ," +
                "a."+a8+" = b."+b8+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 9 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob,
                             String a1, String b1,
                             String a2, String b2,
                             String a3, String b3,
                             String a4, String b4,
                             String a5, String b5,
                             String a6, String b6,
                             String a7, String b7,
                             String a8, String b8,
                             String a9, String b9
    ){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+" ," +
                "a."+a3+" = b."+b3+" ," +
                "a."+a4+" = b."+b4+" ," +
                "a."+a5+" = b."+b5+" ," +
                "a."+a6+" = b."+b6+" ," +
                "a."+a7+" = b."+b7+" ," +
                "a."+a8+" = b."+b8+" ," +
                "a."+a9+" = b."+b9+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }
    //method for 10 set of field to be updated
    public String StmExecute(String Ta, String Tb, String Wa, String Wb, String Wo, String Oa, String Ob,
                             String a1, String b1,
                             String a2, String b2,
                             String a3, String b3,
                             String a4, String b4,
                             String a5, String b5,
                             String a6, String b6,
                             String a7, String b7,
                             String a8, String b8,
                             String a9, String b9,
                             String a10, String b10
    ){
        String statement=null;



        statement = "UPDATE "+Ta+" AS a INNER JOIN "+Tb+" " +
                "AS b ON a."+ Oa +" = b."+ Ob +" " +
                "SET " +

                "a."+a1+" = b."+b1+" ," +
                "a."+a2+" = b."+b2+" ," +
                "a."+a3+" = b."+b3+" ," +
                "a."+a4+" = b."+b4+" ," +
                "a."+a5+" = b."+b5+" ," +
                "a."+a6+" = b."+b6+" ," +
                "a."+a7+" = b."+b7+" ," +
                "a."+a8+" = b."+b8+" ," +
                "a."+a9+" = b."+b9+" ," +
                "a."+a10+" = b."+b10+"" +

                " "+Wa +" "+Wo+" "+Wb +" "+                                   ";";
        return statement;
    }

}
